<html>
<head><meta charset="utf-8"><title>tying to which part of the code · t-compiler/wg-self-profile · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/index.html">t-compiler/wg-self-profile</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/tying.20to.20which.20part.20of.20the.20code.html">tying to which part of the code</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="173217646"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/tying%20to%20which%20part%20of%20the%20code/near/173217646" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/tying.20to.20which.20part.20of.20the.20code.html#173217646">(Aug 14 2019 at 16:14)</a>:</h4>
<p>Hey <span class="user-group-mention" data-user-group-id="1123">@WG-self-profile</span> -- so I was talking to some folks yesterday who had been diagnosting a major compilation time issue. They expressed a desire (that I think many of us have) to be able to gain more insight into what parts of their code are causing compilation time explosions. This was an initial goal for the self-profile work. I was wondering if anybody had thought more about it in the meantime?</p>
<p>They also were having trouble finding the docs. As far as I know, the docs are still basically on the measureme crate, right? Maybe we can add some kind of pointer to <a href="https://doc.rust-lang.org/rustc/index.html" target="_blank" title="https://doc.rust-lang.org/rustc/index.html">the rustc book</a>, this seems like a feature that a lot of people would have an interest in.</p>



<a name="173217936"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/tying%20to%20which%20part%20of%20the%20code/near/173217936" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/tying.20to.20which.20part.20of.20the.20code.html#173217936">(Aug 14 2019 at 16:18)</a>:</h4>
<p>Hi niko!</p>
<blockquote>
<p>They expressed a desire (that I think many of us have) to be able to gain more insight into what parts of their code are causing compilation time explosions.</p>
</blockquote>
<p>You mean what parts of their code are causing <code>rustc</code> to spend a lot of time processing rather than what parts of <code>rustc</code> are taking a long time right?</p>
<blockquote>
<p>hey also were having trouble finding the docs. As far as I know, the docs are still basically on the measureme crate, right? </p>
</blockquote>
<p>Yeah, <a href="https://github.com/rust-lang/measureme/blob/master/summarize/Readme.md" target="_blank" title="https://github.com/rust-lang/measureme/blob/master/summarize/Readme.md">that's correct</a>.</p>
<blockquote>
<p>Maybe we can add some kind of pointer to the rustc book, this seems like a feature that a lot of people would have an interest in.</p>
</blockquote>
<p>This is a good idea. I think there's already a section on profiling which this could be added to.</p>



<a name="173226389"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/tying%20to%20which%20part%20of%20the%20code/near/173226389" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/tying.20to.20which.20part.20of.20the.20code.html#173226389">(Aug 14 2019 at 18:00)</a>:</h4>
<p><span class="user-mention" data-user-id="125250">@Wesley Wiser</span> </p>
<blockquote>
<p>You mean what parts of their code are causing rustc to spend a lot of time processing rather than what parts of rustc are taking a long time right?</p>
</blockquote>
<p>correct</p>



<a name="173226408"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/tying%20to%20which%20part%20of%20the%20code/near/173226408" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/tying.20to.20which.20part.20of.20the.20code.html#173226408">(Aug 14 2019 at 18:00)</a>:</h4>
<p>I think the idea was basically that we could tag the items with the <code>DefId</code> they are "primarily" processing or something</p>



<a name="173226419"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/tying%20to%20which%20part%20of%20the%20code/near/173226419" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/tying.20to.20which.20part.20of.20the.20code.html#173226419">(Aug 14 2019 at 18:00)</a>:</h4>
<p>it seems like an oft-requested and very interesting feature to me</p>



<a name="173226505"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/tying%20to%20which%20part%20of%20the%20code/near/173226505" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/tying.20to.20which.20part.20of.20the.20code.html#173226505">(Aug 14 2019 at 18:01)</a>:</h4>
<p>Yeah, I think <span class="user-mention" data-user-id="124287">@mw</span> had some ideas about how to do this (more) efficiently by using the incremental graph and <code>NodeId</code>s but I may be misremembering.</p>



<a name="173292731"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/tying%20to%20which%20part%20of%20the%20code/near/173292731" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/tying.20to.20which.20part.20of.20the.20code.html#173292731">(Aug 15 2019 at 14:01)</a>:</h4>
<p>I could imagine some really interesting tooling here ...</p>



<a name="173292788"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/tying%20to%20which%20part%20of%20the%20code/near/173292788" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/tying.20to.20which.20part.20of.20the.20code.html#173292788">(Aug 15 2019 at 14:01)</a>:</h4>
<p>we are not recording query-keys/function args yet, so at the moment the data will give only limited insight</p>



<a name="173292938"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/tying%20to%20which%20part%20of%20the%20code/near/173292938" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/tying.20to.20which.20part.20of.20the.20code.html#173292938">(Aug 15 2019 at 14:03)</a>:</h4>
<p>regarding the usability of this feature: we are not really at a point where others can use it, I think</p>



<a name="173295175"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/tying%20to%20which%20part%20of%20the%20code/near/173295175" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/tying.20to.20which.20part.20of.20the.20code.html#173295175">(Aug 15 2019 at 14:32)</a>:</h4>
<p>we should record this feature request somewhere (i.e. about making the compiler tell you what part of your code causes compiletime increases)</p>



<a name="173295187"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/tying%20to%20which%20part%20of%20the%20code/near/173295187" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/tying.20to.20which.20part.20of.20the.20code.html#173295187">(Aug 15 2019 at 14:33)</a>:</h4>
<p>it keeps coming up</p>



<a name="173298038"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/tying%20to%20which%20part%20of%20the%20code/near/173298038" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/tying.20to.20which.20part.20of.20the.20code.html#173298038">(Aug 15 2019 at 15:12)</a>:</h4>
<p>I filed <a href="https://github.com/rust-lang/measureme/issues/51" target="_blank" title="https://github.com/rust-lang/measureme/issues/51">https://github.com/rust-lang/measureme/issues/51</a></p>



<a name="173368674"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/tying%20to%20which%20part%20of%20the%20code/near/173368674" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/tying.20to.20which.20part.20of.20the.20code.html#173368674">(Aug 16 2019 at 12:23)</a>:</h4>
<p>thanks, <span class="user-mention" data-user-id="125250">@Wesley Wiser</span> !</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>